#include<stdio.h>
int main(void)
{   int i=0,n,data[100],num=0,min;
    scanf("%d",&n);
    scanf("%d",&data[i]);
	min=data[i];
	for(i=1;i<n;i++)
	   {scanf("%d",&data[i]);
	   if(data[i]<=min){min=data[i];}
	   }
	for(i=0;i<n;i++)if(data[i]%min==0)num++;
	printf("%d",num);
	return 0;
 } 
